<template>
  <div class="child1">
    <h1>孙子组件</h1>
    <p>{{ car }}</p>
    <button @click="updateCar">更新数据</button>
  </div>
</template>

<script setup lang="ts">
import { inject } from "vue";
let car = inject("TOKEN")
const updateCar = ()=> {
  car.value = '自行车'
}

</script>
<style scoped lang="less">
.child1 {
  width: 200px;
  height: 200px;
  background: red;
}
</style>